x86/domctl: Simplfy XEN_DOMCTL_getvcpuextstate when xsave is not in use
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 12 Sep 2016 09:30:00 +0000 (10:30 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 13 Sep 2016 09:44:01 +0000 (10:44 +0100)
commit6accc5f1af1b51ea4fefcddce72db4e795f580c3
treeff6a6a2527e4f7aef1ea0e3d6f225dbf0ce34778
parentd4a322557ae98cccdf90a0f442a29e1f5d76378a
x86/domctl: Simplfy XEN_DOMCTL_getvcpuextstate when xsave is not in use

Older guests will not use xsave even if it is available.  As such, their
xcr0_accum will be 0 at the point of migrate.

If it is empty, forgo the memory allocation and serialisation into a
zero-length buffer.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domctl.c